/**********************************************************************************************************************
* COPYRIGHT 
* ------------------------------------------------------------------------------------------------------------------- 
* Copyright (c) iSOFT INFRASTRUCTURE SOFTWARE CO., LTD. This software is proprietary to 
* iSOFT INFRASTRUCTURE SOFTWARE CO., LTD., and all rights are reserved by iSOFT INFRASTRUCTURE SOFTWARE CO., LTD. 
* Without the express written permission of the company, no organization or individual may copy, install, trial, 
* distribute, or reverse engineer this software. For terms of use and further details, please refer to the End User 
* License Agreement (EULA) or contact us business@i-soft.com.cn for more assistance. 
* 
* This file contains code from EasyXMen, which is licensed under the LGPL-2.1. However, due to a special exception, 
* you are not required to comply with the provisions of section 6a of LGPL-2.1. Specifically, you may distribute 
* your software, including this file, under terms of your choice, including proprietary licenses, without needing to 
* provide the source code or object code as specified in section 6a. For more details, please refer to the project's 
* LICENSE and EXCEPTION files and the specific exception statement.  
* ------------------------------------------------------------------------------------------------------------------- 
* FILE DESCRIPTION 
* ------------------------------------------------------------------------------------------------------------------- 
*  @MCU                : S32K148 
*  @file               : Os_Cfg.h 
*  @license            : Evaliation 
*  @licenseExpiryDate  :  
*  @date               : 2024-10-22 18:21:26 
*  @customer           : EasyXMen User 
*  @toolVersion        : 2.0.18 
*********************************************************************************************************************/ 

/*============================================================================*/
#ifndef OS_CFG_H
#define OS_CFG_H

/*=======[I N C L U D E S]====================================================*/
#include "Std_Types.h"

/*=======[F I L E  V E R S I O N   I N F O R M A T I O N]===============================*/
#define     OS_CFG_H_AR_MAJOR_VERSION              19U
#define     OS_CFG_H_AR_MINOR_VERSION              11U
#define     OS_CFG_H_AR_PATCH_VERSION              0U
#define     OS_CFG_H_SW_MAJOR_VERSION              2U
#define     OS_CFG_H_SW_MINOR_VERSION              0U
#define     OS_CFG_H_SW_PATCH_VERSION              0U

/*=======[M A C R O S]========================================================*/

/* --------------------Core-------------------- */
/* Core Definition*/
#define     CFG_CORE_MAX                           (6U)
#define     OS_CORE_ID_MASTER                      ((Os_CoreIdType)0U)
#define     OS_CORE_ID_0                           ((Os_CoreIdType)0U)
#define     OS_NONAUTOSARCORE_ID_0                     ((Os_CoreIdType)1U)
#define     OS_NONAUTOSARCORE_ID_1                     ((Os_CoreIdType)2U)
#define     OS_NONAUTOSARCORE_ID_2                     ((Os_CoreIdType)3U)
#define     OS_NONAUTOSARCORE_ID_3                     ((Os_CoreIdType)4U)
#define     OS_NONAUTOSARCORE_ID_4                     ((Os_CoreIdType)5U)
/* OsNumberOfCores: number of cores that are controlled by the AUTOSAR OS*/
#define     OS_AUTOSAR_CORES                       (1U)

#define     CFG_CORE0_AUTOSAROS_ENABLE             TRUE
#define     CFG_CORE1_AUTOSAROS_ENABLE             FALSE
#define     CFG_CORE2_AUTOSAROS_ENABLE             FALSE
#define     CFG_CORE3_AUTOSAROS_ENABLE             FALSE
#define     CFG_CORE4_AUTOSAROS_ENABLE             FALSE
#define     CFG_CORE5_AUTOSAROS_ENABLE             FALSE

/* core start address. */
#define     CFG_CORE0_START_ADDRESS                    &_start
#define     CFG_CORE1_START_ADDRESS                    &_start
#define     CFG_CORE2_START_ADDRESS                    &_start
#define     CFG_CORE3_START_ADDRESS                    &_start
#define     CFG_CORE4_START_ADDRESS                    &_start
#define     CFG_CORE5_START_ADDRESS                    &_start
/* ---------------OsPeripheral Definition-------------------- */
#define     CFG_PERIPHERAL_MAX                      0U
/* --------------------system-------------------- */
/* Scalability Class */
#define     CFG_SC                                  OS_SC1

/* Conformance  Class */
#define     CFG_CC                                  OS_ECC2

/* System Status: stardard, extended */
#define     CFG_STATUS                              OS_STATUS_EXTENDED

/* App Mode Definition */
#define     DONOTCARE                              ((Os_AppModeType)0x0U)
#define     OSDEFAULTAPPMODE                        ((Os_AppModeType)0x1U)

/* system timer */
#define     CFG_SYSTEM_TIMER_ENABLE               TRUE

#define     CFG_SYSTEM_TIMER_ENABLE_CORE0           TRUE
#define     CFG_SYSTEM_TIMER_ENABLE_CORE1           FALSE
#define     CFG_SYSTEM_TIMER_ENABLE_CORE2           FALSE
#define     CFG_SYSTEM_TIMER_ENABLE_CORE3           FALSE
#define     CFG_SYSTEM_TIMER_ENABLE_CORE4           FALSE
#define     CFG_SYSTEM_TIMER_ENABLE_CORE5           FALSE
/* System timer register value define */
#define     CFG_REG_OSTIMER_VALUE_CORE0             (80000U)

/* Timing Protection */
#define     CFG_TIMING_PROTECTION_ENABLE            FALSE
#define     CFG_TIMING_PROTECTION_ENABLE_CORE1         FALSE
#define     CFG_TIMING_PROTECTION_ENABLE_CORE2         FALSE
#define     CFG_TIMING_PROTECTION_ENABLE_CORE3         FALSE
#define     CFG_TIMING_PROTECTION_ENABLE_CORE4         FALSE
#define     CFG_TIMING_PROTECTION_ENABLE_CORE5         FALSE

/* timing protection timer register value */
#define     CFG_REG_TP_TIMER_VALUE_CORE0            (80000U)

#define     CFG_SYSTEM_STACK_MAX                    (1U)

/* wether support trace function */
#define     CFG_TRACE_ENABLE                        FALSE

/* wether check stack overflow */
#define     CFG_STACK_CHECK                         TRUE

#define     CFG_CRITICAL_ZONE_MAX                   1U

/* Hooks */
#define     CFG_ERRORHOOK                           TRUE
#define     CFG_PRETASKHOOK                         FALSE
#define     CFG_POSTTASKHOOK                        FALSE
#define     CFG_STARTUPHOOK                         TRUE
#define     CFG_SHUTDOWNHOOK                        TRUE
#define     CFG_USEGETSERVICEID                     FALSE
#define     CFG_USEPARAMETERACCESS                  FALSE
#define     CFG_PROTECTIONHOOK                      FALSE
#define     CFG_READYTASKHOOK                       FALSE

#define     CFG_APPL_STARTUPHOOK                   FALSE
#define     CFG_APPL_ERRORHOOK                     FALSE
#define     CFG_APPL_SHUTDOWNHOOK                  FALSE

/* --------------------Task Definition-------------------- */
/* Scheduling policy: full preemptive, no preemptive, mixed preemptive */
#define     CFG_SCHED_POLICY                        OS_PREEMPTIVE_MIXED
/* number of task and resource priority in system */
#define     CFG_PRIORITY_MAX_CORE0                  (5U)
/* group of priority */
#define     CFG_PRIORITY_GROUP_CORE0                (1U)
/* All of the tasks */
#define     CFG_TASK_MAX                           (6U)
#define     CFG_EXTENDED_TASK_MAX                  (0U)
/* Core0 */
#define     CFG_TASK_MAX_CORE0                      (6U)
#define     CFG_EXTENDED_TASK_MAX_CORE0             (0U)
#define     OsTask_100ms                                ((Os_TaskType)0x0000U)
#define     OsTask_10ms                                 ((Os_TaskType)0x0001U)
#define     OsTask_1ms                                  ((Os_TaskType)0x0002U)
#define     OsTask_5ms                                  ((Os_TaskType)0x0003U)
#define     OsTask_Init                                 ((Os_TaskType)0x0004U)
#define     OS_TASK_IDLE_CORE0                      ((Os_TaskType)0x0005U)
/* Core1 */
#define     CFG_TASK_MAX_CORE1                      (0U)
#define     CFG_EXTENDED_TASK_MAX_CORE1             (0U)
/* Core2 */
#define     CFG_TASK_MAX_CORE2                      (0U)
#define     CFG_EXTENDED_TASK_MAX_CORE2             (0U)
/* Core3 */
#define     CFG_TASK_MAX_CORE3                      (0U)
#define     CFG_EXTENDED_TASK_MAX_CORE3             (0U)
/* Core4 */
#define     CFG_TASK_MAX_CORE4                      (0U)
#define     CFG_EXTENDED_TASK_MAX_CORE4             (0U)
/* Core5 */
#define     CFG_TASK_MAX_CORE5                      (0U)
#define     CFG_EXTENDED_TASK_MAX_CORE5             (0U)
/* --------------------ISR Definition-------------------- */
#define     CFG_ISR_MAX                             (5U)
#define     CFG_ISR2_MAX                            (5U)
/* wether support interrupt nest */
#define     CFG_INT_NEST_ENABLE                     FALSE
/* highest ISR2 interrupt priority */
#define     CFG_ISR2_IPL_MAX_CORE0                  (10U)
#define     CFG_ISR2_IPL_MAX_CORE1                  (0U)
#define     CFG_ISR2_IPL_MAX_CORE2                  (0U)
#define     CFG_ISR2_IPL_MAX_CORE3                  (0U)
#define     CFG_ISR2_IPL_MAX_CORE4                  (0U)
#define     CFG_ISR2_IPL_MAX_CORE5                  (0U)

/* Core0*/
#define     CFG_ISR_MAX_CORE0                       (5U)
#define     CFG_ISR2_MAX_CORE0                      (5U)
#define     CFG_SYS_TIMER_CORE0_ID                  (0x0000U)     /*system timer*/
#define     CFG_ISR_CAN0_ORed_ID                        (0x0001U)
#define     CFG_ISR_CAN0_ORed_0_15_MB_ID                        (0x0002U)
#define     CFG_ISR_CAN0_ORed_16_31_MB_ID                       (0x0003U)
#define     CFG_ISR_FTM0_Ch0_Ch1_ID                         (0x0004U)
/* Core1*/
#define     CFG_ISR_MAX_CORE1                       (0U)
#define     CFG_ISR2_MAX_CORE1                      (0U)
/* Core2*/
#define     CFG_ISR_MAX_CORE2                       (0U)
#define     CFG_ISR2_MAX_CORE2                      (0U)
/* Core3*/
#define     CFG_ISR_MAX_CORE3                       (0U)
#define     CFG_ISR2_MAX_CORE3                      (0U)
/* Core4*/
#define     CFG_ISR_MAX_CORE4                       (0U)
#define     CFG_ISR2_MAX_CORE4                      (0U)
/* Core5*/
#define     CFG_ISR_MAX_CORE5                       (0U)
#define     CFG_ISR2_MAX_CORE5                      (0U)

/* --------------------Counter Definition-------------------- */
#define     CFG_COUNTER_MAX                         (1U)
/* Core0*/
#define     CFG_COUNTER_MAX_CORE0                   (1U)
#define     SystemTimer_Core0                       ((Os_CounterType)0x0000U)
/* PRQA S 3472 ++ */ /* MISRA Dir-4.9 */
#define     OS_TICKS2NS_SystemTimer_Core0(ticks)    ((ticks)*1000*1000)
#define     OS_TICKS2US_SystemTimer_Core0(ticks)    ((ticks)*1000)
#define     OS_TICKS2MS_SystemTimer_Core0(ticks)    ((ticks)*1000/1000)
#define     OS_TICKS2SEC_SystemTimer_Core0(ticks)   ((ticks)*1000/1000000)
#define     OS_NS2TICKS_SystemTimer_Core0(ns)       ((ns)/1000/1000)
#define     OS_US2TICKS_SystemTimer_Core0(us)       ((us)/1000)
#define     OS_MS2TICKS_SystemTimer_Core0(ms)       ((ms)*1000/1000)
#define     OS_SEC2TICKS_SystemTimer_Core0(sec)     ((sec)*1000000/1000)
/* PRQA S 3472 -- */ /* MISRA Dir-4.9 */
/* Core1*/
#define     CFG_COUNTER_MAX_CORE1                   (0U)
/* Core2*/
#define     CFG_COUNTER_MAX_CORE2                   (0U)
/* Core3*/
#define     CFG_COUNTER_MAX_CORE3                   (0U)
/* Core4*/
#define     CFG_COUNTER_MAX_CORE4                   (0U)
/* Core5*/
#define     CFG_COUNTER_MAX_CORE5                   (0U)
/* --------------------Alarm Definition-------------------- */
#define     CFG_ALARM_MAX                           (4U)
#define     CFG_AUTO_ALARM_MAX                      (4U)
/* Core0*/
#define     CFG_ALARM_MAX_CORE0                     (4U)
#define     CFG_AUTO_ALARM_MAX_CORE0                (4U)
#define     OsAlarm_100ms                               ((Os_AlarmType)0x0000U)
#define     OsAlarm_10ms                                ((Os_AlarmType)0x0001U)
#define     OsAlarm_1ms                                 ((Os_AlarmType)0x0002U)
#define     OsAlarm_5ms                                 ((Os_AlarmType)0x0003U)
/* Core1*/
#define     CFG_ALARM_MAX_CORE1                     (0U)
#define     CFG_AUTO_ALARM_MAX_CORE1                (0U)
/* Core2*/
#define     CFG_ALARM_MAX_CORE2                     (0U)
#define     CFG_AUTO_ALARM_MAX_CORE2                (0U)
/* Core3*/
#define     CFG_ALARM_MAX_CORE3                     (0U)
#define     CFG_AUTO_ALARM_MAX_CORE3                (0U)
/* Core4*/
#define     CFG_ALARM_MAX_CORE4                     (0U)
#define     CFG_AUTO_ALARM_MAX_CORE4                (0U)
/* Core5*/
#define     CFG_ALARM_MAX_CORE5                     (0U)
#define     CFG_AUTO_ALARM_MAX_CORE5                (0U)

/* --------------------Schedule Table Definition-------------------- */
#define     CFG_SCHEDTBL_MAX                        (0U)
/* Core0*/
#define     CFG_SCHEDTBL_MAX_CORE0                  (0U)
/* Core1*/
#define     CFG_SCHEDTBL_MAX_CORE1                  (0U)
/* Core2*/
#define     CFG_SCHEDTBL_MAX_CORE2                  (0U)
/* Core3*/
#define     CFG_SCHEDTBL_MAX_CORE3                  (0U)
/* Core4*/
#define     CFG_SCHEDTBL_MAX_CORE4                  (0U)
/* Core5*/
#define     CFG_SCHEDTBL_MAX_CORE5                  (0U)
/* --------------------Event Definition-------------------- */
#define     CFG_EVENT_MAX                           0U
/* -------------------Resource Definition------------------ */
#define     CFG_USERESSCHEDULER                     TRUE
#define     CFG_RESOURCE_MAX                         (1U)     /* STD + INTERNAL */
#define     CFG_STD_RESOURCE_MAX                    (1U)
#define     CFG_INTERNAL_RESOURCE_MAX               (0U)
/* Core0*/
#define     CFG_RESOURCE_MAX_CORE0                  (1U)     /* STD + INTERNAL */
#define     CFG_STD_RESOURCE_MAX_CORE0              (1U)
#define     CFG_INTERNAL_RESOURCE_MAX_CORE0         (0U)
#define     RES_SCHEDULER_CORE0                     ((Os_ResourceType)0x0000U)
/* Core1*/
#define     CFG_RESOURCE_MAX_CORE1                  (0U)
#define     CFG_STD_RESOURCE_MAX_CORE1              (0U)
#define     CFG_INTERNAL_RESOURCE_MAX_CORE1         (0U)
/* Core2*/
#define     CFG_RESOURCE_MAX_CORE2                  (0U)
#define     CFG_STD_RESOURCE_MAX_CORE2              (0U)
#define     CFG_INTERNAL_RESOURCE_MAX_CORE2         (0U)
/* Core3*/
#define     CFG_RESOURCE_MAX_CORE3                  (0U)
#define     CFG_STD_RESOURCE_MAX_CORE3              (0U)
#define     CFG_INTERNAL_RESOURCE_MAX_CORE3         (0U)
/* Core4*/
#define     CFG_RESOURCE_MAX_CORE4                  (0U)
#define     CFG_STD_RESOURCE_MAX_CORE4              (0U)
#define     CFG_INTERNAL_RESOURCE_MAX_CORE4         (0U)
/* Core5*/
#define     CFG_RESOURCE_MAX_CORE5                  (0U)
#define     CFG_STD_RESOURCE_MAX_CORE5              (0U)
#define     CFG_INTERNAL_RESOURCE_MAX_CORE5         (0U)
/* ---------------OsApplication Definition----------------- */
#define     CFG_OSAPPLICATION_MAX                   0U
/* ---------------OsAppEcucPartitionRef-------------------- */
/*Spinlock Definition*/
#define     CFG_SPINLOCK_MAX                       (0U)

/*  whether shell the os service*/
#define     CFG_SRV_SHELLOS                         FALSE

/* SC34: Memory Protection. */
#define     CFG_MEMORY_PROTECTION_ENABLE            FALSE

/* SC34: Service Protection. */
#define     CFG_SERVICE_PROTECTION_ENABLE           FALSE

#define     CFG_TRUSTED_SYSTEM_SERVICE_MAX          0U
/* ------------------------IOC Definition---------------------- */

#define CFG_IOC_MAX                              (0U)
#define OS_IOC_DATA_HEAD_SIZE                    sizeof(Os_IocU16Type)

#define     CFG_CPU_USAGE_ENABLE                   FALSE

#endif /* endif OS_CFG_H */
/*=======[E N D   O F   F I L E]==============================================*/

